﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Scala.Compiler.Ast
{
    public class AssignStatement:Statement
    {
        private readonly Expression[] _left;
        private readonly Expression _right;

        public AssignStatement(Expression[] left, Expression right)
        {
            _left = left;
            _right = right;
        }

        public IList<Expression> Left
        {
            get { return _left; }
        }

        public Expression Right
        {
            get { return _right; }
        }

        public override void Walk(ScalaWalker walker)
        {
            if (walker.Walk(this))
            {
                foreach (Expression e in _left)
                {
                    e.Walk(walker);
                }
                _right.Walk(walker);
            }
            walker.PostWalk(this);
        }

        public override Microsoft.Scripting.Ast.Expression Reduce()
        {
            throw new NotImplementedException();
        }
    }
}
